{extend name="base" /}
{block name="body"}
<div class="layui-card">
    <div class="layui-card-header">{if condition="isset($data) "} 编辑项目{else}添加项目{/if}</div>
    <div class="layui-card-body">
        <form action="{:request()->url()}" class="layui-form" method="post">
            <div class="layui-form-item">
                <input type="hidden" name="id" value="{$data.id|default=''}">
                <label class="layui-form-label">* 项目名称</label>
                <div class="layui-input-inline">
                    <input type="text" name="name" value="{$data.name|default=''}" autocomplete="off" placeholder="请输入原因" lay-verify="required" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">项目描述</label>
                <div class="layui-input-inline">
                    <textarea name="desc">{$data.desc|default=''}</textarea>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">开始日期</label>
                <div class="layui-input-inline">
                    <input type="date" name="date" value="{$data.date}" autocomplete="off" lay-verify="required" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">完结日期</label>
                <div class="layui-input-inline">
                    <input type="date" name="out_time" value="{$data.out_time}" autocomplete="off"  lay-verify="required" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">* 状态</label>
                <div >
                    <input type="radio" name="status" {if condition="isset($data) and $data.status eq 0"} checked="checked"{/if} value="0" >未开始<input type="radio" name="status" {if condition="isset($data) and $data.status eq 1"} checked="checked"{/if} value="1" >进行中
                    <input type="radio" name="status" {if condition="isset($data) and $data.status eq 2"} checked="checked"{/if} value="2" >已完结
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-input-block">
                    <button class="layui-btn" lay-filter="*" lay-submit="">保存</button>
                    <button class="layui-btn layui-btn-primary" type="reset">重置</button>
                </div>
            </div>
        </form>
    </div>
</div>
{/block}
